; ModuleID = 'math.c'
source_filename = "math.c"
target triple = "unknown-unknown-unknown"

define dso_local i32 @add(i32 noundef %a, i32 noundef %b) {
entry:
  %addtmp = add nsw i32 %a, %b
  ret i32 %addtmp
}

define dso_local i32 @clamp_non_negative(i32 noundef %x) {
entry:
  %cmp = icmp slt i32 %x, 0
  %sel = select i1 %cmp, i32 0, i32 %x
  ret i32 %sel
}

define dso_local i32 @compute(i1 noundef zeroext %boost, i32 noundef %value) {
entry:
  %base = call i32 @clamp_non_negative(i32 %value)
  %double = shl i32 %base, 1
  %sel = select i1 %boost, i32 %double, i32 %base
  ret i32 %sel
}

define dso_local i32 @main() {
entry:
  %call = call i32 @add(i32 4, i32 -1)
  %call1 = call i32 @compute(i1 true, i32 -3)
  %call2 = call i32 @compute(i1 false, i32 5)
  %addtmp = add nsw i32 %call, %call1
  %addtmp3 = add nsw i32 %addtmp, %call2
  ret i32 %addtmp3
}
